import request from "@/utils/request";

// 查询作品列表
export function listArtwork(query) {
  return request({
    url: "/gallery/artwork/list",
    method: "get",
    params: query,
  });
}

// 查询作品详细
export function getArtwork(artworkId) {
  return request({
    url: "/gallery/artwork/" + artworkId,
    method: "get",
  });
}

// 新增作品
export function addArtwork(data) {
  return request({
    url: "/gallery/artwork",
    method: "post",
    data: data,
  });
}

// 修改作品
export function updateArtwork(data) {
  return request({
    url: "/gallery/artwork",
    method: "put",
    data: data,
  });
}

// 删除作品
export function delArtwork(artworkId) {
  return request({
    url: "/gallery/artwork/" + artworkId,
    method: "delete",
  });
}
